home *** CD-ROM | disk | FTP | other *** search
/ NOVA - For the NeXT Workstation / NOVA - For the NeXT Workstation.iso / SourceCode / AdobeExamples / NX_Scroll / ScrollApp.h < prev    next >
Encoding:
Text File  |  1992-12-19  |  3.6 KB  |  144 lines

  1.  
  2. /*
  3.  * (a)  (C) 1990 by Adobe Systems Incorporated. All rights reserved.
  4.  *
  5.  * (b)  If this Sample Code is distributed as part of the Display PostScript
  6.  *    System Software Development Kit from Adobe Systems Incorporated,
  7.  *    then this copy is designated as Development Software and its use is
  8.  *    subject to the terms of the License Agreement attached to such Kit.
  9.  *
  10.  * (c)  If this Sample Code is distributed independently, then the following
  11.  *    terms apply:
  12.  *
  13.  * (d)  This file may be freely copied and redistributed as long as:
  14.  *    1) Parts (a), (d), (e) and (f) continue to be included in the file,
  15.  *    2) If the file has been modified in any way, a notice of such
  16.  *      modification is conspicuously indicated.
  17.  *
  18.  * (e)  PostScript, Display PostScript, and Adobe are registered trademarks of
  19.  *    Adobe Systems Incorporated.
  20.  * 
  21.  * (f) THE INFORMATION BELOW IS FURNISHED AS IS, IS SUBJECT TO
  22.  *    CHANGE WITHOUT NOTICE, AND SHOULD NOT BE CONSTRUED
  23.  *    AS A COMMITMENT BY ADOBE SYSTEMS INCORPORATED.
  24.  *    ADOBE SYSTEMS INCORPORATED ASSUMES NO RESPONSIBILITY
  25.  *    OR LIABILITY FOR ANY ERRORS OR INACCURACIES, MAKES NO
  26.  *    WARRANTY OF ANY KIND (EXPRESS, IMPLIED OR STATUTORY)
  27.  *    WITH RESPECT TO THIS INFORMATION, AND EXPRESSLY
  28.  *    DISCLAIMS ANY AND ALL WARRANTIES OF MERCHANTABILITY, 
  29.  *    FITNESS FOR PARTICULAR PURPOSES AND NONINFRINGEMENT
  30.  *    OF THIRD PARTY RIGHTS.
  31.  */
  32.  
  33. /*
  34.  *    ScrollApp.h
  35.  *
  36.  *    This class performs some of the global functions necessary to start
  37.  *    the application. The drawing window is created here.
  38.  *
  39.  *    Version:    2.0
  40.  *    Author:    Ken Anderson, Ken Fromm
  41.  *    History:
  42.  *            03-07-91        Added this comment.
  43.  */
  44.  
  45. #import <appkit/Application.h>
  46. #import <appkit/View.h>
  47.  
  48. #define FONTSIZE    5
  49. #define MARGIN        3
  50.  
  51. #define SCROLLVIEW_BORDER NX_NOBORDER
  52.  
  53. #define  PTS_UPATH_BUFFER        2000
  54. #define  OPS_UPATH_BUFFER        1001
  55.  
  56. typedef struct _UPath {
  57.     float     * pts;
  58.     int        num_pts;
  59.     char        *ops;
  60.     int        num_ops;
  61. } UPath;
  62.  
  63. @interface ScrollApp : Application
  64. {
  65.     id    redrawButton,            /* button for redrawing (also stops drawing) */
  66.         statusmatrixId,        /* ucache status text matrix */
  67.         timingmatrixId,        /* timing text matrix */
  68.         strokingmatrixId,        /* wire frame stroking button matrix */
  69.         parametermatrixId;        /* set each parameter explicity */
  70.  
  71.     id    menuitemId,            /* Window cell in Activate menu option */
  72.         methodsWindow,        /* needed for modal session */
  73.         drawingviewId,        /* the drawing view */
  74.         docviewId,            /* contains the drawing view, allows zooming*/
  75.         scrollviewId,            /* the scrolling view */
  76.         windowId,            /* the window the views above are in */
  77.         readerId;                /* the object that reads ps files and places */
  78.                             /* them in the data structure for display. */
  79.  
  80.     int    windowBacking;        /* either retained or buffered */
  81.  
  82.     BOOL    trace,
  83.             runningDrawModal;
  84.  
  85.     char        *currentfile;        /* complete path name of file */
  86.  
  87.     UPath    drawBuffer;
  88. }
  89.  
  90. + new;
  91.  
  92. - createWindow:(NXRect *) winRect;
  93.  
  94. - free;
  95.  
  96. - setMenuItem:anObject;
  97.  
  98. - setRedrawButton:anObject;
  99. - redrawButton;
  100. - methodsWindow;
  101.  
  102. - setStatusMatrix:anObject;
  103. - getStatusMatrix;
  104.  
  105. - setTimingMatrix:anObject;
  106. - getTimingMatrix;
  107.  
  108. - setStrokingMatrix:anObject;
  109. - getStrokingMatrix;
  110.  
  111. - setParameterMatrix:anObject;
  112. - getParameterMatrix;
  113.  
  114. - setTypeOfDrawing:sender;
  115. - setSelectivity:sender;
  116. - setDrawingManner:sender;
  117. - setParameterSetting:sender;
  118. - setStroking:sender;
  119. - setWindowBacking:sender;
  120.  
  121. - showWindow:sender;
  122.  
  123. - setTracing:sender;
  124. - (BOOL) tracing;
  125. - zoom:sender;
  126. - redrawAction:sender;
  127. - redraw:sender;
  128. - displayFields:sender;
  129.  
  130. - getDrawingView;
  131. - getDocument;
  132. - (UPath *) getUpathBuffer;
  133.  
  134. - load:sender;
  135.  
  136. - setName:(const char *)file withParsing:(BOOL) flag;
  137.  
  138. - windowDidResize:sender;
  139.  
  140. - (int) runDrawModalSession:(NXModalSession *) session;
  141.  
  142. @end
  143.  
  144.